<!DOCTYPE html>
<html lang="en">
<head>
    <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  </head>
</head>
<body>
    <div class="container">
        <ul class="nav nav-tabs">
            <li role="presentation">
                <a href="/">Index</a>
            </li>
            <li role="presentation" class="active">
                <a href="/note">Note</a>
            </li>
        </ul>
        {% for get_flashed_message in get_flashed_messages() %}
            <div class="alert alert-danger" role="alert" style="margin-top: 10px">
                {{ get_flashed_message }}
            </div>
        {% endfor %}
        <div class="row">
            <div class="col-sm-offset-1 col-sm-10 col-xs-offset-2 col-xs-8">
                <div id="write" style="margin-top: 3%;">
                    <h1>Write Note</h1>
                    <form action="" method="post">
                        <div class="form-group">
                            <label for="title">Title</label>
                            <input name="title" type="text" class="form-control" placeholder="Note Title">
                        </div>
                        <div class="form-group">
                            <label for="passage">Passage</label>
                            <textarea name="passage" class="form-control" rows="8"></textarea>
                        </div>
                        <div style="margin-top: 0.2%">
                            <button type="submit" class="btn btn-success">Submit!</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div id="note" style="margin-top: 5%; border-top: azure;">
            {% for note in notes %}
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            {{ note.title }}
                        </h3>
                    </div>
                    <div class="panel-body">
                        {{ note.passage|safe }}
                    </div>
                </div>
            {% endfor %}
        </div>
        </ul>
    </div>
</body>
</html>